package com.Servce.impl;

import com.Dao.StudentDao;
import com.Dao.impl.StudentDaoimpl;
import com.Servce.StudentServce;
import com.domain.Student;

import java.sql.SQLException;
import java.util.List;
public class StudentServiceimpl implements StudentServce {
    private StudentDao studentDao = new StudentDaoimpl();
    @Override
    public List<Student> findAll() throws SQLException {
        return studentDao.findAll();
    }

    @Override
    public Student findById(Integer sid) {
        return studentDao.findById(sid);
    }

    @Override
    public int insert(Student student) {
        return studentDao.insert(student);
    }

    @Override
    public int update(Student student) {
        return studentDao.update(student);
    }

    @Override
    public int delete(Integer sid) {
        return studentDao.delete(sid);
    }
}
